package com.example.upload.controller;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class A {
    public static void main(String[] args) {

        long duration = 100;
        long progress  = 20;

        BigDecimal decimal = BigDecimal.valueOf(duration)
                .divide(BigDecimal.valueOf(progress), 2, RoundingMode.HALF_DOWN)
                .multiply(BigDecimal.valueOf(100));


        BigDecimal divide = BigDecimal.valueOf(progress).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_DOWN);
        BigDecimal multiply = BigDecimal.valueOf(duration).multiply(divide);

        System.out.println(multiply.intValue());
    }
}
